﻿#pragma once

#include <inttypes.h>

// 跨平台相关宏定义
#if defined(__linux__) || defined(__linux)
#   define BREAKING_OS_LINUX   1
#else
#   define BREAKING_OS_WINDOWS 1
#endif

// 安全删除指针
#define BREAKING_SAFE_DELETE(ptr) \
	do \
	{ \
		delete ptr; \
		ptr = nullptr; \
	} while (false);

// 安全删除指针数组
#define BREAKING_SAFE_DELETE_ARRAY(ptr) \
	do \
	{ \
		delete[] ptr; \
		ptr = nullptr; \
	} while (false);
